div
    #conditionContainer(style="padding:1rem 2rem 0.5rem 1rem;")
        
        .prj-section(style="margin-top:16px;")
            .items-list(style="float:left;margin-top:0;")
                span(style="font-weight:bold;margin-right:20px;font-size:1.1rem;")  查询条件:
                .item.condition(data-ng-repeat="item in conditions",data-ng-click="removeCondition($index)",data-ng-class="{'no-border':$index===conditions.length-1}")
                    span(data-ng-bind="item.text+'    '")
                    i.icon.close
                #addCondition.item.condition.active
                    i.icon.add
                .ui.flowing.popup
                    form.ui.form(style="width:300px;")
                        .grouped.fields
                            label(style="font-size:1rem;") 增加查询条件,单位{{clickType==='design'?'厘米(cm)':'毫米(mm)'}}
                            .field.input-field
                                .horizontal-container
                                    .ui.radio.checkbox.checked(data-ng-click="setType('less')")
                                        input(type="radio",name="condition",value="less")
                                        label 小于
                                    input.int-input(type="number",data-ng-model="minItem.max")
                            .field.input-field
                                .horizontal-container
                                    .ui.radio.checkbox.checked(data-ng-click="setType('between')")
                                        input(type="radio",name="condition",value="between",checked="")
                                        label 介于
                                    input.int-input(type="number",data-ng-model="betweenItem.min")
                                    span.int-input -
                                    input.int-input(type="number",data-ng-model="betweenItem.max")
                            .field.input-field
                                .horizontal-container
                                    .ui.radio.checkbox.checked(data-ng-click="setType('more')")
                                        input(type="radio",name="condition",value="more")
                                        label 大于
                                    input.int-input(type="number",data-ng-model="maxItem.min")
                        .ui.button.red.submit.tiny(data-ng-click="addCondition()") 增加条件
            .ui.button.icon.right.floated.help(style="")
                i.ui.icon.help
            .ui.flowing.popup
                div(style="width:250px;letter-spacing:1px;")
                    p 
                        b(style="color:#3B83C0;") 设计值查询:
                        | 选择1个年份,查询该年份的收敛直径同设计值的变化,单位厘米(cm)
                    p 
                        b(style="color:#E07B53;") 阶段值查询:
                        | 选择2个年份,查询2个年份之间收敛直径的阶段变化,单位毫米(mm)
                                
            .ui.buttons.right.floated(style="")
                #queryBtn.ui.button.blue.floating.dropdown(data-ng-class="{'loading':busy}",data-ng-click="clickType='design'")
                    span 设计值查询
                    // i.ui.icon.dropdown    CriticalSectionMonitor
                    .menu
                        .header 选择1个日期                                        
                        .item(data-ng-repeat="item in allTimes",data-text="{{item.time}}",data-ng-class="{'active':item.active}",style="font-size:13px;",data-ng-click="query($index,'design')")
                            i.icon.calendar
                            span(data-ng-bind="item.time")
                .or
                #queryDiffBtn.ui.button.orange.floating.dropdown(data-ng-class="{'loading':busy}",data-ng-click="clickType='diff'")
                    span 阶段值查询
                    // i.ui.icon.dropdown
                    .menu
                        .header 选择2个日期                    
                        .item(data-ng-repeat="item in allTimes",data-text="{{item.time}}",style="font-size:13px;",data-ng-click="item.checked=!item.checked;query($index,'diff',$event)")
                            input.ui.checkbox(type="checkbox",data-ng-model="item.checked", style="margin-right:10px;  vertical-align: top;")
                            span(data-ng-bind="item.time",style="position:absolute;left:0;padding-left:45px;")
            .clear
    .divider

#tabContainer(data-ng-show="showTab",style="padding:1rem 3rem 3rem 1rem;")
    .ui.secondary.pointing.menu(style="border-bottom-width:1px;padding:0 2rem;")
        a.item.tab-item.active(data-tab="tab0") 图表
        a.item.tab-item(data-tab="tab1",data-ng-show="!busy") 线路总计
        a.item.tab-item(data-tab="tab2",data-ng-show="!busy") 区间详情
        a.item.tab-item(data-tab="tab3",data-ng-show="!busy") 最大(小)值
        a.item.tab-item(data-tab="tab4",data-ng-show="!busy")  环数统计
    br
    .ui.bottom.attached.tab.tab-pane.active(data-tab="tab0")
        //chart在这里    
        div(id="chart",style="min-height:300px;")
            .divider
    .ui.bottom.attached.tab.tab-pane(data-tab="tab1")
        table.ui.table.small.stastic-table.celled(style="width:95%;margin:1rem 2rem;",data-ng-show="busy===false")
            thead
                tr
                    th.first.center.aligned {{searchType==='design'?startYear+'与设计值相比统计':startYear+'至'+endYear+'阶段变化'}}
                    th.center.aligned  个数
                    th.center.aligned  比例
            tbody.one-body
                tr(data-ng-repeat="c in chartData.datas")
                    td.first.center.aligned {{c.text}}
                    td.center.aligned(style="color:#2976DB") {{c.count}}
                    td.center.aligned {{c.ratio}}
        br
    .ui.bottom.attached.tab.tab-pane(data-tab="tab2")
        //表格在这里
        table.ui.table.small.stastic-table.celled(style="width:95%;margin:1rem 2rem;")
            thead
                tr
                    th.first.center.aligned(colspan="2",rowspan="2") 区间 
                    th.center.aligned(colspan="{{conditions.length}}",data-ng-bind="searchType==='design'?startYear+'与设计值相比/个数':startYear+'至'+endYear+'阶段差值/个数'")
                tr
                    th.center.aligned(data-ng-repeat="c in chartData.datas",data-ng-bind="c.text")  
            tbody(data-ng-repeat="item in resultList")
                tr(data-ng-repeat="locationItem in item.resultData")
                    td.center.aligned.first(data-ng-if="$index===0",rowspan="{{item.resultData.length}}") {{item.name}}
                    td.center.aligned {{locationItem.location}}
                    td.center.aligned(data-ng-repeat="c in locationItem.datas") {{c.count}}
        br      
    .ui.bottom.attached.tab.tab-pane(data-tab="tab3")
        //表格在这里
        table.ui.table.small.stastic-table.celled(style="width:95%;margin:1rem 2rem;")
            thead
                tr
                    th.first.center.aligned(colspan="2") 区间 
                    th.center.aligned 隧道类型
                    th.center.aligned 区间内最大(小)直径
                    th.center.aligned 点号
                    th.center.aligned 环号
                    th.center.aligned 里程
                    th.center.aligned(data-ng-show="searchType==='design'") {{startYear}}实测直径(m)
                    th.center.aligned(data-ng-show="searchType==='design'") 设计直径(m)
                    th.center.aligned(data-ng-show="searchType==='design'") 与设计差值(mm)
                    th.center.aligned(data-ng-show="searchType==='diff'") {{startYear}}直径(m)
                    th.center.aligned(data-ng-show="searchType==='diff'") {{endYear}}直径(m)       
                    th.center.aligned(data-ng-show="searchType==='diff'") 阶段变化(mm)
            tbody(data-ng-repeat="item in resultList")
                tr(data-ng-repeat-start="locationItem in item.resultData")
                    td.center.aligned.first(data-ng-if="$index===0",rowspan="{{item.resultData.length*2}}") {{item.name}}
                    td.center.aligned(rowspan="2") {{locationItem.location}}
                    td.center.aligned(rowspan="2") {{locationItem.tunnelType}}
                    td.center.aligned.red 最大
                    td.center.aligned {{searchType==='design'?locationItem.maxPointAllTheTime.name:locationItem.maxPointThisTime.name}}
                    td.center.aligned {{searchType==='design'?locationItem.maxPointAllTheTime.ringNumber:locationItem.maxPointThisTime.ringNumber}}
                    td.center.aligned {{searchType==='design'?locationItem.maxPointAllTheTime.mileage:locationItem.maxPointThisTime.mileage}}
                    td.center.aligned(data-ng-show="searchType==='design'") {{locationItem.maxPointAllTheTime.measureValue}}
                    td.center.aligned(data-ng-show="searchType==='design'") {{locationItem.maxPointAllTheTime.designValue}}
                    td.center.aligned(data-ng-show="searchType==='design'") {{locationItem.maxPointAllTheTime.value}}
                    td.center.aligned(data-ng-show="searchType==='diff'") {{locationItem.maxPointThisTime.lastValue}}     
                    td.center.aligned(data-ng-show="searchType==='diff'") {{locationItem.maxPointThisTime.curValue}}     
                    td.center.aligned(data-ng-show="searchType==='diff'") {{locationItem.maxPointThisTime.value}}                    
                tr(data-ng-repeat-end="")
                    td.center.aligned.green  最小
                    td.center.aligned {{searchType==='design'?locationItem.minPointAllTheTime.name:locationItem.minPointThisTime.name}}
                    td.center.aligned {{searchType==='design'?locationItem.minPointAllTheTime.ringNumber:locationItem.minPointThisTime.ringNumber}}
                    td.center.aligned {{searchType==='design'?locationItem.minPointAllTheTime.mileage:locationItem.minPointThisTime.mileage}}
                    td.center.aligned(data-ng-show="searchType==='design'") {{locationItem.minPointAllTheTime.measureValue}}
                    td.center.aligned(data-ng-show="searchType==='design'") {{locationItem.minPointAllTheTime.designValue}}
                    td.center.aligned(data-ng-show="searchType==='design'") {{locationItem.minPointAllTheTime.value}}
                    td.center.aligned(data-ng-show="searchType==='diff'") {{locationItem.minPointThisTime.lastValue}}    
                    td.center.aligned(data-ng-show="searchType==='diff'") {{locationItem.minPointThisTime.curValue}}    
                    td.center.aligned(data-ng-show="searchType==='diff'") {{locationItem.minPointThisTime.value}}  
    .ui.bottom.attached.tab.tab-pane(data-tab="tab4")
        br
        div(id="totalChart",style="min-height:300px;")
            .divider